// 总配置
import ApplicationMock from './profiles/application-mock';
import ApplicationPre from './profiles/application-pre';
import ApplicationTest from './profiles/application-test';
import ApplicationStore from './profiles/application-store';
import Application from './profiles/application';
import environment from './environment';
import {isEmpty} from "../utils/index";
// 采用继承方式做4个环境的配置
let active = environment.profiles['active'];
let profile = isEmpty(active)?'pro':active;
const application = {
  'mock': new ApplicationMock(),
  'test': new ApplicationTest(),
  'pre': new ApplicationPre(),
  'pro': new Application(),
  'store':new ApplicationStore()
}[profile]
export default application;
